@import '../common.scss';

.accordion__container {
  margin-bottom: 1rem;
}

.accordion__title {
  padding-left: 2.149rem !important;
  padding-right: 2.149rem !important;
  font-size: 1.111rem !important;
  font-weight: $font-weight-semi-bold;
}

.accordion {
  background-color: var(--color-background);
  border: 3px solid var(--color-text);
  border-radius: 5px;
  color: var(--color-text);
  cursor: pointer;
  padding: 1rem;
  width: 100%;
  text-align: left;
  outline: none;
  font-size: 15px;
  transition: max-width 0.4s;
}

.active,
.accordion:focus,
.accordion:hover {
  background-color: var(--color-main);
}

.active:focus {
  border: 3px solid var(--color-text);
}

.accordion:after {
  content: '+';
  font-size: 1.5rem;
  float: right;
  margin-left: 5px;
}

.active,
.active:not(:focus-visible) {
  border-color: var(--color-background);
}

.active:after {
  content: '-';
  font-size: 1.5rem;
}

.panel {
  background-color: var(--color-background);
  padding: 2rem 18px;
}

.accordion--side-navigation {
  width: 100%;
  margin-left: unset;

  .accordion {
    border: none;
    padding: 0 !important;
    background-color: transparent !important;
    color: var(--color-text) !important;
    border-radius: 0;
  }

  .accordion__title {
    font-size: 16px !important;
    font-weight: unset;
    background-color: transparent;

    &:hover {
      background-color: var(--color-text) !important;
      color: var(--color-background) !important;
    }
  }

  .panel {
    padding: 1rem 0 0 !important;
    background-color: transparent;

    ul {
      margin-left: 1rem;
    }
  }

  .active,
  .accordion:hover {
    background-color: var(--color-text);
    color: var(--color-background);
  }

  .accordion:after,
  .active:after {
    content: '';
  }
}
